package com.mimi.config;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @Author 徐向(Arthur Xu)
 * @Description:
 * @Date: Created in  22:41 2017/10/23
 **/
//先注释,单元测试会报错,打tomcat8的war包不需要配置注入,在java -jar下才需要.因为tomcat8支持websoket.注意注释掉Component
//@Component
public class WebSocketConfig {

    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return  new ServerEndpointExporter();
    }
}
